\(\int \cos (c+d x) (a+i a \tan (c+d x))^{3/2} \, dx\) [303]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F]
   Maxima [B] (verification not implemented)
   Giac [F]
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 24, antiderivative size = 31 \[ \int \cos (c+d x) (a+i a \tan (c+d x))^{3/2} \, dx=-\frac {2 i a \cos (c+d x) \sqrt {a+i a \tan (c+d x)}}{d} \]

[Out]

-2*I*a*cos(d*x+c)*(a+I*a*tan(d*x+c))^(1/2)/d

Rubi [A] (verified)

Time = 0.06 (sec) , antiderivative size = 31, normalized size of antiderivative = 1.00, number of steps used = 1, number of rules used = 1, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.042, Rules used = {3574} \[ \int \cos (c+d x) (a+i a \tan (c+d x))^{3/2} \, dx=-\frac {2 i a \cos (c+d x) \sqrt {a+i a \tan (c+d x)}}{d} \]

[In]

Int[Cos[c + d*x]*(a + I*a*Tan[c + d*x])^(3/2),x]

[Out]

((-2*I)*a*Cos[c + d*x]*Sqrt[a + I*a*Tan[c + d*x]])/d

Rule 3574

Int[((d_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[2*b*(
d*Sec[e + f*x])^m*((a + b*Tan[e + f*x])^(n - 1)/(f*m)), x] /; FreeQ[{a, b, d, e, f, m, n}, x] && EqQ[a^2 + b^2
, 0] && EqQ[Simplify[m/2 + n - 1], 0]

Rubi steps \begin{align*} \text {integral}& = -\frac {2 i a \cos (c+d x) \sqrt {a+i a \tan (c+d x)}}{d} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.34 (sec) , antiderivative size = 31, normalized size of antiderivative = 1.00 \[ \int \cos (c+d x) (a+i a \tan (c+d x))^{3/2} \, dx=-\frac {2 i a \cos (c+d x) \sqrt {a+i a \tan (c+d x)}}{d} \]

[In]

Integrate[Cos[c + d*x]*(a + I*a*Tan[c + d*x])^(3/2),x]

[Out]

((-2*I)*a*Cos[c + d*x]*Sqrt[a + I*a*Tan[c + d*x]])/d

Maple [A] (verified)

Time = 15.16 (sec) , antiderivative size = 47, normalized size of antiderivative = 1.52

method result size
default \(-\frac {2 i \sqrt {a \left (1+i \tan \left (d x +c \right )\right )}\, a \left (\left (\sin ^{2}\left (d x +c \right )\right ) \cos \left (d x +c \right )+\cos ^{3}\left (d x +c \right )\right )}{d}\) \(47\)

[In]

int(cos(d*x+c)*(a+I*a*tan(d*x+c))^(3/2),x,method=_RETURNVERBOSE)

[Out]

-2*I/d*(a*(1+I*tan(d*x+c)))^(1/2)*a*(sin(d*x+c)^2*cos(d*x+c)+cos(d*x+c)^3)

Fricas [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 40, normalized size of antiderivative = 1.29 \[ \int \cos (c+d x) (a+i a \tan (c+d x))^{3/2} \, dx=\frac {\sqrt {2} {\left (-i \, a e^{\left (2 i \, d x + 2 i \, c\right )} - i \, a\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}}}{d} \]

[In]

integrate(cos(d*x+c)*(a+I*a*tan(d*x+c))^(3/2),x, algorithm="fricas")

[Out]

sqrt(2)*(-I*a*e^(2*I*d*x + 2*I*c) - I*a)*sqrt(a/(e^(2*I*d*x + 2*I*c) + 1))/d

Sympy [F]

\[ \int \cos (c+d x) (a+i a \tan (c+d x))^{3/2} \, dx=\int \left (i a \left (\tan {\left (c + d x \right )} - i\right )\right )^{\frac {3}{2}} \cos {\left (c + d x \right )}\, dx \]

[In]

integrate(cos(d*x+c)*(a+I*a*tan(d*x+c))**(3/2),x)

[Out]

Integral((I*a*(tan(c + d*x) - I))**(3/2)*cos(c + d*x), x)

Maxima [B] (verification not implemented)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 201 vs. \(2 (25) = 50\).

Time = 0.40 (sec) , antiderivative size = 201, normalized size of antiderivative = 6.48 \[ \int \cos (c+d x) (a+i a \tan (c+d x))^{3/2} \, dx=\frac {2 \, {\left (i \, a^{\frac {3}{2}} - \frac {2 i \, a^{\frac {3}{2}} \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {i \, a^{\frac {3}{2}} \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}}\right )} {\left (-\frac {2 i \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac {\sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} - 1\right )}^{\frac {3}{2}}}{d {\left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + 1\right )}^{\frac {3}{2}} {\left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - 1\right )}^{\frac {3}{2}} {\left (-\frac {2 i \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {2 i \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} + \frac {\sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}} - 1\right )}} \]

[In]

integrate(cos(d*x+c)*(a+I*a*tan(d*x+c))^(3/2),x, algorithm="maxima")

[Out]

2*(I*a^(3/2) - 2*I*a^(3/2)*sin(d*x + c)^2/(cos(d*x + c) + 1)^2 + I*a^(3/2)*sin(d*x + c)^4/(cos(d*x + c) + 1)^4
)*(-2*I*sin(d*x + c)/(cos(d*x + c) + 1) + sin(d*x + c)^2/(cos(d*x + c) + 1)^2 - 1)^(3/2)/(d*(sin(d*x + c)/(cos
(d*x + c) + 1) + 1)^(3/2)*(sin(d*x + c)/(cos(d*x + c) + 1) - 1)^(3/2)*(-2*I*sin(d*x + c)/(cos(d*x + c) + 1) -
2*I*sin(d*x + c)^3/(cos(d*x + c) + 1)^3 + sin(d*x + c)^4/(cos(d*x + c) + 1)^4 - 1))

Giac [F]

\[ \int \cos (c+d x) (a+i a \tan (c+d x))^{3/2} \, dx=\int { {\left (i \, a \tan \left (d x + c\right ) + a\right )}^{\frac {3}{2}} \cos \left (d x + c\right ) \,d x } \]

[In]

integrate(cos(d*x+c)*(a+I*a*tan(d*x+c))^(3/2),x, algorithm="giac")

[Out]

integrate((I*a*tan(d*x + c) + a)^(3/2)*cos(d*x + c), x)

Mupad [B] (verification not implemented)

Time = 0.25 (sec) , antiderivative size = 60, normalized size of antiderivative = 1.94 \[ \int \cos (c+d x) (a+i a \tan (c+d x))^{3/2} \, dx=-\frac {a\,\left (2\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2-1\right )\,\sqrt {\frac {a\,\left (2\,{\cos \left (c+d\,x\right )}^2+\sin \left (2\,c+2\,d\,x\right )\,1{}\mathrm {i}\right )}{2\,{\cos \left (c+d\,x\right )}^2}}\,2{}\mathrm {i}}{d} \]

[In]

int(cos(c + d*x)*(a + a*tan(c + d*x)*1i)^(3/2),x)

[Out]

-(a*(2*cos(c/2 + (d*x)/2)^2 - 1)*((a*(sin(2*c + 2*d*x)*1i + 2*cos(c + d*x)^2))/(2*cos(c + d*x)^2))^(1/2)*2i)/d